home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 209 / 209.d81 / menorah v2 (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  194 lines

  1. 0 print"[147]":poke828,0:gosub480
  2. 1 ti$="000000"
  3. 5 rem general setup and loading
  4. 10 poke55,0:poke56,128:clr:rem lowers top of basic
  5. 20 mu=0:rem music flag
  6. 25 fori=0to24:pokei+54272,0:next:rem clear sid chip
  7. 30 sys57812"sid player",8,0:poke780,0:poke781,0:poke782,192:sys65493
  8. 35 q9$="chanukah.mus"
  9. 40 sys57812q9$,8,0:poke780,0:poke781,0:poke782,128:sys65493
  10. 45 gosub180:gosub120
  11. 50 goto200
  12. 120 rem :: start/restart music ::
  13. 125 ifmuthengosub140
  14. 130 sys49435:poke781,0:poke782,128:sys49458:poke49152,7:mu=1:return
  15. 135 :
  16. 140 rem :: stop music ::
  17. 145 poke49152,0:poke54276,0:poke54283,0:poke54290,0:sys49629:mu=0:return
  18. 150 :
  19. 155 rem :: resume music ::
  20. 160 ifpeek(49152)=7thenreturn
  21. 165 sys49435:poke49152,7:mu=1:return
  22. 170 :
  23. 175 rem :: check music ::
  24. 180 ifpeek(49152)=7thenreturn
  25. 185 ifmuthengosub140:gosub120
  26. 190 return
  27. 200 if ml=1 then225 
  28. 205 gosub480:print"[147]"
  29. 210 poke56,56:poke55,0
  30. 212 d=peek(186)
  31. 213 gosub 140
  32. 219 gosub155
  33. 220 rem rest of program
  34. 225 poke53280,00:poke53281,00:print"[147]"chr$(142);
  35. 226 print"[158]to light the candles, press the numbers"
  36. 227 print"  1 through 8 in the appropriate order"
  37. 230 print"":wk$="[151][213]"
  38. 235 printspc(20);wk$
  39. 240 printspc(17);wk$;"   [146]  ";wk$
  40. 245 printspc(14);wk$;"   [146]   [146]   [146]  ";wk$
  41. 250 printspc(11);wk$;"   [146]   [146]   [146]   [146]   [146]  ";wk$
  42. 255 printspc(8);wk$;"   [146]   [146]   [146]   [146]   [146]   [146]   [146]  ";wk$
  43. 260 printspc(8)" [146]   [146]   [146]   [146]   [146]   [146]   [146]   [146]   [146]"
  44. 265 printspc(8)" [146]   [146]   [146]   [146]   [146]   [146]   [146]   [146]   [146]"
  45. 270 printspc(8)" [146]   [146]   [146]   [146]   [146]   [146]   [146]   [146]   [146]"
  46. 275 printspc(8)" [146]   [146]   [146]   [146] [158][202][178][203]  [146]   [146]   [146]   [146]"
  47. 280 printspc(8)" [146]   [146]   [146] [158][202][178][203] [221] [202][178][203]  [146]   [146]   [146]"
  48. 285 printspc(8)" [146]   [146] [158][202][178][203] [202][192][192][219][192][192][203] [202][178][203]  [146]   [146]"
  49. 290 printspc(8)" [146] [158][202][178][203] [202][192][192][192][192][192][219][192][192][192][192][192][203] [202][178][203]  [146]"
  50. 295 printspc(7)"[158][202][178][203] [202][192][192][192][192][192][192][192][192][219][192][192][192][192][192][192][192][192][203] [202][178][203]"
  51. 300 printspc(8)"[158][202][192][192][192][192][192][192][192][192][192][192][192][219][192][192][192][192][192][192][192][192][192][192][192][203]"
  52. 305 printspc(19)"[169][183][223][146]"
  53. 310 printspc(17)"[169][183][183][183][183][183][223][146]"
  54. 315 printspc(15)"[169][183][183][183][183][183][183][183][183][183][223][146]"
  55. 320 printspc(13)"[169][183][183][183][183][183][183][183][183][183][183][183][183][183][223][146]"
  56. 325 printspc(13)"happy chanukah![146]"
  57. 330 getx$:ifx$=""then330
  58. 335 x=val(x$):ifx$="q"then40000
  59. 336 ifx<0orx>8then330
  60. 340 y=x:onx+1goto475,345,360,375,390,415,430,445,460
  61. 345 pokev+21,2
  62. 350 fordelay=0to500:next
  63. 355 goto405
  64. 360 pokev+21,4
  65. 362 fordelay=0to500:next:poke v+21,6
  66. 365 fordelay=0to500:next
  67. 370 goto405
  68. 375 pokev+21,8
  69. 376 fordelay=0to500:next:poke v+21,12
  70. 377 fordelay=0to500:next:poke v+21,14
  71. 380 fordelay=0to500:next
  72. 385 goto405
  73. 390 pokev+21,16
  74. 391 fordelay=0to500:next:poke v+21,24
  75. 392 fordelay=0to500:next:poke v+21,28
  76. 393 fordelay=0to500:next:poke v+21,30
  77. 395 fordelay=0to500:next
  78. 400 goto405
  79. 405 pokev+21,(peek(v+21))+1
  80. 406 if y=8thengosub1100:goto406
  81. 410 gosub1100:pokev+21,0:goto330
  82. 415 pokev+21,32
  83. 416 fordelay=0to500:next:poke v+21,48
  84. 417 fordelay=0to500:next:poke v+21,56
  85. 418 fordelay=0to500:next:poke v+21,60:for delay=0to500:next:pokev+21,62
  86. 420 fordelay=0to500:next
  87. 425 goto405
  88. 430 pokev+21,64
  89. 431 fordelay=0to500:next:poke v+21,96
  90. 432 fordelay=0to500:next:poke v+21,112
  91. 433 fordelay=0to500:next:poke v+21,120:for delay=0to500:next:pokev+21,124
  92. 434 fordelay=0to500:next:poke v+21,126
  93. 435 fordelay=0to500:next
  94. 440 goto405
  95. 445 pokev+21,128
  96. 446 fordelay=0to500:next:poke v+21,192
  97. 447 fordelay=0to500:next:poke v+21,224:for delay=0to500:next:pokev+21,224
  98. 448 fordelay=0to500:next:poke v+21,248:for delay=0to500:next:pokev+21,254
  99. 450 fordelay=0to500:next:ify>7then460
  100. 455 goto405
  101. 460 pokev,80:pokev+1,101:poke21,1
  102. 461 fordelay=0to500:next:poke v+21,129:for delay=0to500:next:pokev+21,193
  103. 462 fordelay=0to500:next:poke v+21,225:for delay=0to500:next:pokev+21,241
  104. 463 fordelay=0to500:next:poke v+21,249:for delay=0to500:next:pokev+21,255
  105. 465 fordelay=0to500:next
  106. 470 if y=8thengosub1200
  107. 475 gosub1100:pokev+21,0:y=0:goto230
  108. 480 ifpeek(828)>0then700
  109. 481 poke53280,06:poke53281,06:print"[147][158]";chr$(14)
  110. 485 print"[211]halom, [198]riends!"
  111. 490 print"  [201] wrote this program in honor of all"
  112. 495 print"my [202]ewish friends on [209]-[204]ink."
  113. 500 print"  [193]s you celebrate the [198]estival of the"
  114. 505 print"[204]ights, may love and faith be rekindled"
  115. 510 print"and may peace be realized within your"
  116. 515 print"home, within your heart, and throughout"
  117. 520 print"the world!"
  118. 525 print"  [212]o light the candles, press the num-"
  119. 530 print"bers 1 through 8 in the appropriate"
  120. 535 print"order. [212]o blow them out, press 0..."
  121. 540 print"                [198]rom [217]our [198]riendly,"
  122. 545 print"                [206]eighborhood [194][197][196]evil"
  123. 550 print"                (alias [196]ale [215]ard)"
  124. 555 print"[212]his program was revised with [211][201][196] music"
  125. 560 print"and flame sprites added by [203]en [194]arsky."
  126. 561 print"[204]ights will extinguish in 30 seconds."
  127. 562 print"[201]f you want longer fix line 1115
  128. 565 [129]delay[178]1[164]3000:[130]
  129. 566 [139][194](828)[177]0[167]700
  130. 567 [151]828,1
  131. 568 [151]214,23:[153]:[153][163]08)"(NULL)ress (NULL)ey to lenontinue";
  132. 569 [151]198,0:[146]198,1:[161]z$:[151]214,23:[153]:[153][163]8)"                      ";
  133. 700 v[178]53248:[151]53280,0
  134. 720 [143] sprites
  135. 725 [129] po[178]192 [164] 194
  136. 730 [151] p,po
  137. 735 [129] sd[178]0[164]62
  138. 740 [135] r
  139. 745 [151] po[172]64[170]sd,r
  140. 750 [130]:p[178]p[170]1:[130]
  141. 755 [151]v[170]39,7:[151]v[170]40,7:[151]v[170]41,7:[151]v[170]42,7
  142. 760 [151]v[170]43,7:[151]v[170]44,7:[151]v[170]45,7:[151]v[170]46,7
  143. 765 [143] pokev+23,255:rem pokev+29,255:rem expand all
  144. 785 p[178]192:[151]v,176:[151]v[170]2,16:[151]v[170]4,248:[151]v[170]6,224:[151]v[170]16,2
  145. 790 [151]v[170]8,200:[151]v[170]10,151:[151]v[170]12,128:[151]v[170]14,104
  146. 795 [151]v[170]1,69:[151]v[170]3,101:[151]v[170]5,93:[151]v[170]7,85
  147. 800 [151]v[170]9,77:[151]v[170]11,77:[151]v[170]13,85:[151]v[170]15,93:[151]v[170]21,0:
  148. 801 p[178]192
  149. 804 [143]   p=p+1:ifp=195thenp=192
  150. 805 [129] po[178]2040[164]2047:[151] po,p:[130]
  151. 806 [129] delay[178]1[164]100:[130]:[142]
  152. 810 [143]  804
  153. 869 [143] data for flame 1 sprite.
  154. 870 [131]0,0,0,0,8,0,0,24,0
  155. 880 [131]0,28,0,0,28,0,0,28,0
  156. 890 [131]0,62,0,0,62,0,0,63,0
  157. 900 [131]0,119,128,0,99,128,0,193,192
  158. 910 [131]0,193,192,1,193,192,1,129,128
  159. 920 [131]1,131,128,0,199,0,0,124,0
  160. 930 [131]0,0,0,0,0,0,0,0,0
  161. 939 [143]  data for flame 2 sprite.
  162. 940 [131]0,0,0,0,8,0,0,24,0
  163. 950 [131]0,48,0,0,56,0,0,120,0
  164. 960 [131]0,124,0,0,124,0,0,254,0
  165. 970 [131]0,254,0,0,239,0,1,199,0
  166. 980 [131]1,131,128,1,131,128,1,131,128
  167. 990 [131]1,131,128,0,199,0,0,124,0
  168. 1000 [131]0,0,0,0,0,0,0,0,0
  169. 1009 [143]     data for flame 3 sprite.
  170. 1010 [131]0,0,0,0,24,0,0,48,0
  171. 1020 [131]0,48,0,0,112,0,0,112,0
  172. 1030 [131]0,248,0,0,248,0,0,252,0
  173. 1040 [131]1,220,0,3,206,0,3,135,0
  174. 1050 [131]3,131,0,3,131,128,3,131,128
  175. 1060 [131]1,195,128,0,199,0,0,124,0
  176. 1070 [131]0,0,0,0,0,0,0,0,0
  177. 1100 ti$[178]"000000"
  178. 1101 [151]198,0:[151]53280,0
  179. 1105 p[178]p[170]1:[139]p[178]195[167]p[178]192
  180. 1106 [139][194](198)[177]0[167]1120
  181. 1110 [129] po[178]2040[164]2047:[151] po,p:[130]
  182. 1114 [139] x[178]8 [167] [141]180:[137]1105
  183. 1115 [139] ti$[179]"000030"[167] 1105
  184. 1116 [143] lights will extinguish after 30seconds: if you want longer fix 1115
  185. 1120 [142]
  186. 1200 [153]"";[163]132)"hag samaiach!!!sys":[142]
  187. 10000 d[178][194](186):n$[178]"menorah v2":[159]15,d,15,"s0:"[170]n$:[160]15:[148]n$,d:[128]
  188. 40000 [151]53280,0:[151]53281,0:[153]"stopload"
  189. 40001 [141]145
  190. 40002 a$[178]"h":b$[178]"l(NULL)a$,d"[170][199](13)[170]"r(NULL)"[170][199](13):[151]646,0:[153]"load"
  191. 40003 [129]x[178]1[164]10:[151]630[170]x,[198]([202](b$,x)):[130]:[151]198,1